import request from '@/utils/request'
import defaultSettings from '@/settings'

// 获取路由
export const getRouters = () => {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/getRouters',
    method: 'get'
  })
}

export function listMenu() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/sysMenu/list',
    method: 'get'
  })
}

export function getAllMenuNotButton() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/sysMenu/getAllMenuNotButton',
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/sysMenu/save',
    method: 'post',
    data: data
  })
}

export function removeById(id) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/sysMenu/removeById?id=' + id,
    method: 'get'
  })
}
